package com.example;

import com.example.servlet.UserServlet;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App2 {

    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("UserServletBean.xml");
        UserServlet userServlet =
                context.getBean("userServlet", UserServlet.class);
        userServlet.addUser();
    }
}
